package com.csc.banking.dao;

import java.util.List;

import javax.persistence.TypedQuery;

import org.springframework.stereotype.Component;

import com.csc.banking.model.Profile;

@Component
public class ProfileDao extends GenaricDao 
{
	@Override
	Class<?> getEntityClass() 
	{
		return Profile.class;
	}
	
	public List<Profile> getAllProfiles() 
	{
    	TypedQuery<Profile> query = em.createQuery(
            "SELECT g FROM Profile g ORDER BY g.profileId", Profile.class);
    	return query.getResultList();
    }

}
